<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
	
    <div class="main">
 
            <div class="inner keywords">
            	<strong>分类浏览：</strong> 
                <a href="{url("?module=sign&action=tag&name=情感")}">情感</a> 
                <a href="{url("?module=sign&action=tag&name=爱情")}">爱情</a>
                <a href="{url("?module=sign&action=tag&name=个性")}">个性</a>
                <a href="{url("?module=sign&action=tag&name=搞笑")}">搞笑</a>
                <a href="{url("?module=sign&action=tag&name=哲理")}">哲理</a>
                <a href="{url("?module=sign&action=tag&name=节日")}">节日</a>
                <a href="{url("?module=sign&action=tag&name=其他")}">其他</a>
                <br/>
                <strong>排序浏览：</strong> 
                <a href="{url("?module=sign")}">最新发布</a> 
                <a href="{url("?module=sign&orderby=flower")}">鲜花排序</a>
                <a href="{url("?module=sign&orderby=egg")}">鸡蛋排序</a>
            </div>
        
             
             <style>
			 	.list li{
					border-bottom:1px dashed #CCCCCC; margin:20px 0 0 0; height:auto; overflow:hidden;
				}
				.list li p{
					margin:0; padding:0;
				}
			 </style>
             <ul class="list">
          	
              {php $orderby = $orderby ? $orderby : ' signid '}
              {get sql="SELECT * FROM `table_sign` WHERE  status=99 ORDER BY $orderby DESC" rows="20" page="$page"}
              {php $keywords = explode(',',$r[keywords]);}
                <li>
                    <p>{str_cut($r[description], 300)}&nbsp;(<a href="#">复制到剪贴板</a>)</p>
                	<p>
                    &nbsp;<a href="javascript:flower({$r[signid]});">送花</a>(<span id="flower{$r[signid]}">{$r[flower]}</span>) 
                    &nbsp;<a href="javascript:egg({$r[signid]});">扔蛋</a>(<span id="egg{$r[signid]}">{$r[egg]}</span>)
                    <a target="_blank" href="{url("?module=space&userid=$r[userid]")}">{username($r[userid])}</a>
                    
                    {if $keywords}
                    tag:
                        {loop $keywords $k $v}
                        <a href="{url("?module=sign&action=tag&name=$v")}">{$v}</a>
                        {/loop}
                    {/if}
                    </p>
                   
                </li>
    
              {/get}
            </ul>
            
            <div class="pagination">
            	{$pages}
            </div>

    </div>
    
    <div class="aside">
    
    	<div class="head">我要分享</div>
        <div class="inner">
        	<a href="{url("?module=$module&action=add")}">发布签名</a>
        </div>
        
        <div class="head">最新发布</div>
        <div>
              <ul>
            {get sql="SELECT * FROM `table_sign` WHERE  status=99 ORDER BY signid DESC" rows="20" page="$page"}
            <li>({$r[hits]})&nbsp;<a href="{url($r[url])}" target="{$target}">{str_cut($r[description], 30)}</a></li>
            {/get}
             </ul>
        </div>
    	
        <div class="head">最多点击</div>
        <div>
              <ul>
            {get sql="SELECT * FROM `table_sign` WHERE  status=99 ORDER BY hits DESC" rows="20" page="$page"}
            <li>({$r[hits]})&nbsp;<a href="{url($r[url])}" target="{$target}">{str_cut($r[description], 30)}</a></li>
            {/get}
             </ul>
        </div>
    	
        <div class="head">最多鲜花</div>
        <div>
              <ul>
            {get sql="SELECT * FROM `table_sign` WHERE  status=99 ORDER BY flower DESC" rows="20" page="$page"}
            <li>({$r[hits]})&nbsp;<a href="{url($r[url])}" target="{$target}">{str_cut($r[description], 30)}</a></li>
            {/get}
             </ul>
        </div>
    	
        <div class="head">最多鸡蛋</div>
        <div>
              <ul>
            {get sql="SELECT * FROM `table_sign` WHERE  status=99 ORDER BY egg DESC" rows="20" page="$page"}
            <li>({$r[hits]})&nbsp;<a href="{url($r[url])}" target="{$target}">{str_cut($r[description], 30)}</a></li>
            {/get}
             </ul>
        </div>
        
          
    </div>
</div>

<script>
	function flower(id){
		$.ajax({
		   type: "POST",
		   url: "?module=sign&action=flower",
		   data: "id="+id,
		   
		   // 加载中状态
		   beforeSend: function(){
			 //$('#loading').fadeIn();
		   },
		   // 成功状态
		   success: function(msg){
			 $('#flower'+id).html(msg);
		   }
		}); 
	}
	
	function egg(id){
		$.ajax({
		   type: "POST",
		   url: "?module=sign&action=egg",
		   data: "id="+id,
		   
		   // 加载中状态
		   beforeSend: function(){
			 //$('#loading').fadeIn();
		   },
		   // 成功状态
		   success: function(msg){
			 $('#egg'+id).html(msg);
		   }
		}); 
	}
</script>


{template 'footer.html'}

